<%--
  Created by IntelliJ IDEA.
  User: 陈俊雄
  Date: 2018/2/24
  Time: 16:23
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!-- Main view -->
<div class="animated fadeInRight">
    <div class="wrapper wrapper-content ng-scope">
        <div class="row">
            <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>{{ 'RISK_TRACK' | translate }}：</h5>
                    </div>
                    <div class="ibox-content sk-loading" ng-controller="orderTrackInfoCtrl">
                        <div class="sk-spinner sk-spinner-wave">
                            <div class="sk-rect1"></div>
                            <div class="sk-rect2"></div>
                            <div class="sk-rect3"></div>
                            <div class="sk-rect4"></div>
                            <div class="sk-rect5"></div>
                        </div>

                        <form name="myform" serializer="searchOrderTrack(data)">
                        
                            <div class="row">
                             <div class="col-sm-6 col-md-6 col-lg-1-5">
                                    <div class="form-group form-group-sm">
                                        <div class="input-group">
                                            <span class="input-group-addon">商户号：</span>
                                            <div uib-tooltip="可通过商户名称搜索商户号"
                                                 angucomplete-alt id="mer_id"
                                                 input-name="merId"
                                                 maxlength="10"
                                                 pause="100"
                                                 auto-match="true"
                                                 selected-object="selectedMerchant"
                                                 local-data="merchants"
                                                 search-fields="id,name"
                                                 title-field="id"
                                                 description-field="name"
                                                 minlength="0"
                                                 focus-first="true"
                                                 input-class="form-control form-control-small"
                                                 match-class="highlight">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-6 col-md-6 col-lg-1-5">
                                    <div class="form-group form-group-sm">
                                        <div class="input-group">
                                            <span class="input-group-addon">商户订单号：</span>
                                            <input type="text" id="merOrderId" name="merOrderId" value=""
                                                   class="form-control">
                                        </div>
                                    </div>
                                </div>
                                 <div class="col-sm-6 col-md-6 col-lg-1-5">
                                    <div class="form-group form-group-sm">
                                        <div class="input-group">
                                            <span class="input-group-addon">跟踪状态：</span>
                                            <select id="status" class="form-control" name="status" ng-model="status" >
                                                <option value=""></option>
                                                <option ng-repeat="obj in payStatusList" value="{{obj.firstValue}}">
                                                       {{obj.name}}
                                                </option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-6 col-md-6 col-lg-1-5">
                                    <div class="form-group form-group-sm">
                                        <div class="input-group">
                                            <span class="input-group-addon">交易起始日期：</span>
                                            <input type="text" id="minTradeTime" name="minTradeTime"
                                                   uib-tooltip="可只选择交易起始日期查询起始日期至今数据"
                                                   class="form-control" ng-readonly="true" ng-click="openDatepicker1()"
                                                   uib-datepicker-popup="{{format}}" ng-model="minTradeTime"
                                                   is-open="popup1.opend"
                                                   datepicker-options="dateOptions1"
                                                   close-text="关闭" alt-input-formats="altInputFormats"
                                                   close-text="关闭" clear-text="清空" current-text="今天">
                                            <span class="input-group-btn">
                                            <button type="button" class="btn btn-default btn-sm no-margins"
                                                    ng-click="openDatepicker1()">
                                                <i class="fa fa-calendar"></i>
                                            </button>
                                        </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-6 col-md-6 col-lg-1-5">
                                    <div class="form-group form-group-sm">
                                        <div class="input-group">
                                            <span class="input-group-addon">交易结束日期：</span>
                                            <input type="text" id="maxTradeTime" name="maxTradeTime"
                                                   class="form-control" ng-readonly="true" ng-click="openDatepicker2()"
                                                   uib-datepicker-popup="{{format}}" ng-model="maxTradeTime"
                                                   is-open="popup2.opend"
                                                   datepicker-options="dateOptions2"
                                                   close-text="关闭" alt-input-formats="altInputFormats"
                                                   ng-disabled="maxTradeTimeDisable"
                                                   close-text="关闭" clear-text="清空" current-text="今天">
                                            <span class="input-group-btn">
                                            <button type="button" class="btn btn-default btn-sm no-margins"
                                                    ng-click="openDatepicker2()"
                                                    ng-disabled="maxTradeTimeDisable">
                                                <i class="fa fa-calendar"></i>
                                            </button>
                                        </span>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-6 col-md-6 col-lg-1-5">
                                    <div class="form-group form-group-sm">
                                        <div class="input-group">
                                            <span class="input-group-addon">来源网址：</span>
                                            <input type="text" id="refer" name="refer" value=""
                                                   class="form-control">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-6 col-md-6 col-lg-3 col-lg-offset-3">
                                    <button type="submit" class="btn btn-sm btn-w-m btn-primary pull-right">
                                                                                                                                 查询
                                    </button>
                                </div>
                                <div class="col-sm-6 col-md-6 col-lg-3">
                                    <button type="button" class="btn btn-sm btn-w-m btn-info"
                                            ng-click="resetForm()">
                                                                                                                                 重置
                                    </button>
                                </div>
                            </div>
                        </form>
                        <div class="hr-line-dashed"></div>
                        <div class="table-responsive">
                            <table ng-table="orderTrackTable"
                                   class="table table-condensed table-striped table-hover table-bordered">
                                <tr ng-repeat="row in $data">
                                    <td class="text-center" data-title="'商户号'">
                                        {{row.merId}}{{row.merName}}
                                    </td>
                                    <td class="text-center" data-title="'域名网址'">
                                        {{row.siteUrl}}
                                    </td>
                                    <td class="text-center" data-title="'商户订单号'">
                                        {{row.merOrderId}}
                                    </td>
                                    <td class="text-center" data-title="'交易币种'">
                                        {{row.currency}}
                                    </td>
                                    <td class="text-center" data-title="'交易金额'">
                                        {{row.amount}}
                                    </td>
                                    <td class="text-center" data-title="'交易时间'">
                                        {{row.tradeTime | date:'yyyy/MM/dd hh:mm'}}
                                    </td>
                                    <td class="text-center" data-title="'跟踪状态'">
                                        {{row.status | enumParamsFilter:[{0:"接口",1:"支付页面",2:"平台风控",3:"外置风控",4:"发送银行",5:"接收银行",6:"返回商户"}]}}
                                    </td>
                                    <td class="text-center" data-title="'来源网址'">
                                        {{row.refer}}
                                    </td>
                                    <td class="text-center" data-title="'来源协议'">
                                        {{row.scheme}}
                                    </td>
                                    <td class="text-center" data-title="'IP'">
                                        {{row.ip}}
                                    </td>
                                    <td class="text-center" data-title="'页面语言'">
                                        {{row.lang}}
                                    </td>
                                    <td class="text-center" data-title="'请求类型'">
                                        {{row.interType | enumParamsFilter:[{0:"跳转",1:"内嵌"}]}}
                                    </td>
                                    <td class="text-center" data-title="'请求结果'">
                                        {{row.result}}
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <my-pagination table-param="orderTrackTable"></my-pagination>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>